<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script>
    var sum = 0;
    var sr = prompt('请输入您的选项:')
    var num1=prompt('输入一个数');
    var num2=prompt('输入第二个数');
    if(sr == 1){
        sum=Number(num1)+Number(num2);
        alert(sum);
    }
</script>
<body>
    
</body>
</html>